<%@ page language="java" import="java.util.*,prepare.InitDB"
	pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%!String userName;
	String userConnectStr = null;%>

<%
	userName=null;
	userConnectStr=null;
	if (InitDB.Userlogin(request.getParameter("username"), request
			.getParameter("password"))) {
		userName = request.getParameter("username");
		userConnectStr = "success";
	}
%>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
	<!--<![endif]-->
	<head>

		<!-- Basic Page Needs
  ================================================== -->
		<meta charset="utf-8">
		<title>MyBlog</title>
		<meta name="description"
			content="Free Responsive Html5 Css3 Templates Designed by Kimmy | ">
		<meta name="author" content="">

		<!-- Mobile Specific Metas
  ================================================== -->
		<meta name="viewport"
			content="width=device-width, initial-scale=1, maximum-scale=1">

		<!-- CSS
  ================================================== -->
		<link rel="stylesheet" href="css/zerogrid.css">
		<link rel="stylesheet" href="css/style.css">
		<link rel="stylesheet" href="css/responsive.css">
		<link rel="stylesheet" href="css/userlogin.css">
		<!--[if lt IE 8]>
       <div style=' clear: both; text-align:center; position: relative;'>
         <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
           <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
        </a>
      </div>
    <![endif]-->
		<!--[if lt IE 9]>
		<script src="js/html5.js"></script>
		<script src="js/css3-mediaqueries.js"></script>
	<![endif]-->

		<link href='./images/favicon.ico' rel='icon' type='image/x-icon' />

	</head>
	<body>
		<div class="wrap-body zerogrid">
			<!--------------Header--------------->
			<header>
			<div class="wrap-header">

				<div class="top">
					<div class="socials">
						<ul>
							<li>
								<a href="#" title="facebook"><img
										src="images/socials/facebook-32x32.png" />
								</a>
							</li>
							<li>
								<a href="#" title="google"><img
										src="images/socials/google-32x32.png" />
								</a>
							</li>
							<li>
								<a href="#" title="twitter"><img
										src="images/socials/twitter-32x32.png" />
								</a>
							</li>
							<li>
								<a href="#" title="rss"><img
										src="images/socials/rss-32x32.png" />
								</a>
							</li>
							<li>
								<a href="#" title="youtube"><img
										src="images/socials/youtube-32x32.png" />
								</a>
							</li>
						</ul>
					</div>
					<div id="search">
						<div class="button-search"></div>
						<input type="text" value="Search..."
							onFocus="if (this.value == &#39;Search...&#39;) {this.value = &#39;&#39;;}"
							onBlur="if (this.value == &#39;&#39;) {this.value = &#39;Search...&#39;;}">
					</div>
				</div>

				<div id="logo">
					<a href="#"><h1>
							MyBlog
						</h1>
					</a>
					<p>
						| Free Responsive Html5 and Css3 Templates
					</p>
				</div>

				<nav>
				<div class="wrap-nav">
					<div class="menu">
						<ul>
							<li>
								<a href="index.jsp">Home</a>
							</li>
							<li>
								<a href="blog.jsp">Blog</a>
							</li>
							<li>
								<a href="blog.jsp">Gallery</a>
							</li>
							<li>
								<a href="blog.jsp">About</a>
							</li>
							<li>
								<a href="#">Contact</a>
							</li>
						</ul>
					</div>
				</div>
				</nav>

			</div>
			</header>
			<div class="copyrights">
				Collect from
				<a href="http://www.cssmoban.com/">模版</a>
			</div>
			<!--------------Content--------------->
			<section id="content">
			<div class="wrap-content">
				<div class="row block">
					<div id="main-content" class="col-2-3">
						<div class="wrap-col">
							<article>
							<div class="heading">
								<h2>
									<a href="#">Sed accumsan libero quis mi commodo et suscipit</a>
								</h2>
							</div>
							<div class="content">
								<img src="images/img1.jpg" width="250px" height="100px" />
								<p>
									Lorem ipsum dolor sit amet, consectetur adipiscing elit.
									Aliquam viverra convallis auctor. Sed accumsan libero quis mi
									commodo et suscipit enim lacinia. Morbi rutrum vulputate est
									sed faucibus. Nulla sed nisl mauris, id tristique tortor. Sed
									iaculis dapibus urna nec dictum. Morbi rutrum vulputate est sed
									faucibus. Nulla sed nisl mauris, id tristique tortor. Sed
									iaculis dapibus urna nec dictum [...]
								</p>

							</div>
							<div class="info">
								<p>
									By Admin on December 01, 2012 -
									<a href="#">01 Commnets</a>
								</p>
							</div>
							</article>
							<article>
							<div class="heading">
								<h2>
									<a href="#">Lorem ipsum dolor sit amet</a>
								</h2>
							</div>
							<div class="content">
								<img src="images/img2.jpg" width="250px" height="100px" />
								<p>
									Lorem ipsum dolor sit amet, consectetur adipiscing elit.
									Aliquam viverra convallis auctor. Sed accumsan libero quis mi
									commodo et suscipit enim lacinia. Morbi rutrum vulputate est
									sed faucibus. Nulla sed nisl mauris, id tristique tortor. Sed
									iaculis dapibus urna nec dictum. Morbi rutrum vulputate est sed
									faucibus. Nulla sed nisl mauris, id tristique tortor. Sed
									iaculis dapibus urna nec dictum [...]
								</p>
							</div>
							<div class="info">
								<p>
									By Admin on December 01, 2012 -
									<a href="#">01 Commnets</a>
								</p>
							</div>
							</article>
							<article>
							<div class="heading">
								<h2>
									<a href="#">Morbi rutrum vulputate est sed faucibus</a>
								</h2>
							</div>
							<div class="content">
								<img src="images/img3.jpg" width="250px" height="100px" />
								<p>
									Lorem ipsum dolor sit amet, consectetur adipiscing elit.
									Aliquam viverra convallis auctor. Sed accumsan libero quis mi
									commodo et suscipit enim lacinia. Morbi rutrum vulputate est
									sed faucibus. Nulla sed nisl mauris, id tristique tortor. Sed
									iaculis dapibus urna nec dictum. Morbi rutrum vulputate est sed
									faucibus. Nulla sed nisl mauris, id tristique tortor. Sed
									iaculis dapibus urna nec dictum [...]
								</p>
							</div>
							<div class="info">
								<p>
									By Admin on December 01, 2012 -
									<a href="#">01 Commnets</a>
								</p>
							</div>
							</article>
						</div>
					</div>
					<div id="sidebar" class="col-1-3">
						<div class="wrap-col">
						<%if(userName==null||!userConnectStr.equals("success")){ %>
							<form action="." method="post" class="box">

								<label>
									Username:
								</label>
								<input type="text" name="username" />
								<label>
									Password:
								</label>
								<input type="password" name="password" />
								<input type="submit" value="登陆" name="submit" class="submit" />
								<a href="#" class="forgetsign">忘记密码</a>
								<a href="#" class="forgetsign">注册</a>
							</form>
							<%}else{ %>
							当前用户：<%=userName %><br>
							<br>
							链接状态：<%=userConnectStr %><br>
							<%} %>
						</div>
						<div class="box">
							<div class="heading">
								<h2>
									Categories
								</h2>
							</div>
							<div class="content">
								<ul>
									<li>
										<a href="#">Free Html5 Templates</a>
									</li>
									<li>
										<a href="#">Free Responsive Themes</a>
									</li>
									<li>
										<a href="#">Free Html5 and Css3 Themes</a>
									</li>
									<li>
										<a href="#">Free Responsive Html5 and Css3 Themes</a>
									</li>
									<li>
										<a href="#">Free Basic Responsive Html5 Css3 Layouts</a>
									</li>
									<li>
										<a href="#">Premium Responsive Html5 Css3 Templates</a>
									</li>
								</ul>
							</div>
						</div>
						<div class="box">
							<div class="heading">
								<h2>
									Popular Post
								</h2>
							</div>
							<div class="content">
								<div class="post">
									<img src="images/img4.jpg" width="50px" />
									<h4>
										<a href="#">Lorem ipsum dolor sit</a>
									</h4>
									<p>
										November 11 ,2012
									</p>
								</div>
								<div class="post">
									<img src="images/img5.jpg" width="50px" />
									<h4>
										<a href="#">Lorem ipsum dolor sit</a>
									</h4>
									<p>
										November 11 ,2012
									</p>
								</div>
								<div class="post">
									<img src="images/img1.jpg" width="50px" />
									<h4>
										<a href="#">Lorem ipsum dolor sit</a>
									</h4>
									<p>
										November 11 ,2012
									</p>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		</section>
		<!--------------Footer--------------->
		<footer>
		<div class="wrap-footer">
			<div class="row">
				<div class="col-1-3">
					<div class="wrap-col">
						<div class="box">
							<div class="heading">
								<h2>
									Image Gallery
								</h2>
							</div>
							<div class="content gallery">
								<a href="#"><img src="images/img1.jpg" width="120px" />
								</a>
								<a href="#"><img src="images/img2.jpg" width="120px" />
								</a>
								<a href="#"><img src="images/img3.jpg" width="120px" />
								</a>
								<a href="#"><img src="images/img4.jpg" width="120px" />
								</a>
								<a href="#"><img src="images/img5.jpg" width="120px" />
								</a>
								<a href="#"><img src="images/img1.jpg" width="120px" />
								</a>
							</div>
						</div>
					</div>
				</div>
				<div class="col-1-3">
					<div class="wrap-col">
						<div class="box">
							<div class="heading">
								<h2>
									About Us
								</h2>
							</div>
							<div class="content">
								<a href="#" target="_blank"><img src="images/zerotheme.jpg"
										style="border: 0px;" />
								</a>
								<p>
									<a href="#" target="_blank">Free Html5 Templates</a> created by
									<a href="#">Zerotheme</a>. You can use and modify the template
									for both personal and commercial use. You must keep all
									copyright information and credit links in the template and
									associated files.
								</p>
							</div>
						</div>
					</div>
				</div>
				<div class="col-1-3">
					<div class="wrap-col">
						<div class="box">
							<div class="heading">
								<h2>
									Contact Us
								</h2>
							</div>
							<div class="content">
								<p>
									Praesent dapibus, neque id cursus faucibus, tortor neque
									egestas augue.
								</p>
								<p>
									Website :
									<a href="#" target="_blank">www.</a>
								</p>
								<p>
									+1 (123) 444-5677
									<br />
									+1 (123) 444-5678
								</p>
								<p>
									Address: 123 TemplateAccess Rd1
								</p>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="copyright">
			<p>
				Copyright © 2014 - More Templates
				<a href="http://www.cssmoban.com/" target="_blank" title="hansn">hansn</a>
			</p>
		</div>
		</footer>

		</div>
	</body>
</html>